// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdAlert
 */
public class AdAlertDaoImpl
    extends org.tinaelle.server.domain.AdAlertDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdAlertDao#toAdAlertDTO(org.tinaelle.server.domain.AdAlert)
     */
    public org.tinaelle.common.dto.AdAlertDTO toAdAlertDTO(final org.tinaelle.server.domain.AdAlert entity)
    {
        return super.toAdAlertDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdAlert loadAdAlertFromAdAlertDTO(org.tinaelle.common.dto.AdAlertDTO adAlertDTO)
    {
        org.tinaelle.server.domain.AdAlert adAlert = this.load(adAlertDTO.getAdAlertId());
        if (adAlert == null)
        {
            adAlert = org.tinaelle.server.domain.AdAlert.Factory.newInstance();
        }
        return adAlert;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdAlertDao#adAlertDTOToEntity(org.tinaelle.common.dto.AdAlertDTO)
     */
    public org.tinaelle.server.domain.AdAlert adAlertDTOToEntity(org.tinaelle.common.dto.AdAlertDTO adAlertDTO)
    {
        org.tinaelle.server.domain.AdAlert entity = this.loadAdAlertFromAdAlertDTO(adAlertDTO);
        this.adAlertDTOToEntity(adAlertDTO, entity, true);
        return entity;
    }
}